package net.jxvtc.lesson01.controller;

import net.jxvtc.lesson01.lesson05.IServerInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Lesson05Controller {

    @Autowired
    private IServerInfo serverInfo;

    @RequestMapping("/showInfo")
    public String getInfo()
    {
        return serverInfo.showInfo();
    }

    @Value("${token}")
    private String token;

    @Value("${nickname}")
    private String nickname;
    @RequestMapping("/value")
    public String getValues()
    {
        return token+":"+nickname;
    }

}
